package com.wyw.design.model.learning.behavioral.status;

/**
 * @Title   抽象状态角色
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2023/4/19 9:42
 * Update History:
 * Author        Time            Content
 */
public abstract class State {
    // 上下文角色，负责状态切换
    protected Ctx context;
    public void setContext(Ctx context) {
        this.context = context;
    }
    // 状态的公共行为，需要子类自行实现其状态对应的行为
    abstract void handle1();
    abstract void handle2();
}


